<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="客户订单记录" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script src="/js/popup_ext.js"></script>
<script language="javascript">
	function doShow(id){
		var url="/business/BusinessBillEdit.ihtm?id="+id+"&alert_type=NONE";
		ShowIframe("业务单",url,1024,600,"refreshWin()",900,600);
	}
	function refreshWin(){
		if(popRetVal!=null){
			window.location=window.location;
		}
	}
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function doGo(pageIndex){
		window.location="/business/BusinessBillListForEstablishment.ihtm?id=${id}&current_page="+pageIndex;
	}
</script>
</head>
<body oncontextmenu="return false" class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:860px;text-align:left;margin:auto;">
	<div class="sheet-top">
		<div class="content">
		  <h2>客户订单记录</h2>
		  <p>客户名称：${est.estName}</p>
		</div>
	</div>
	  <div class="sheet-list">
		  <div class="cue-info">
				<span>金额汇总：${costTotal}元 预付汇总：${imprestTotal}元 </span>
		  </div>
			  <div class="table-list">
			     <table width="100%" align="center">      
 					<tr>
						<th width="14%">单号</th>
						<th width="10%">订货日期</th>
						<th width="19%">摘要</th>
						<th width="10%">交货日期</th>
						<th width="10%">金额</th>
						<th width="10%">预付</th>
						<th width="9%">业务员</th>
						<th width="12%">状态</th>
						<th width="6%">操作</th>
					</tr>
					<c:forEach var="item" items="${qr.list}">
					<tr>
						<td>${item[0].billCode}</td>
						<td><fmt:formatDate value="${item[0].orderDate}" pattern="yyyy-MM-dd"/></td>
						<td>${item[0].content}</td>
						<td>
							<c:if test="${item[0].deliverDate!=null}"><fmt:formatDate value="${item[0].deliverDate}" pattern="yyyy-MM-dd"/></c:if>
						</td>
						<td>${item[0].cost}</td>
						<td>${item[0].imprest}</td>
						<td>${item[0].managerName}</td>
						<td>
							<c:if test="${item[1]=='Y'}">已审核</c:if>
							<c:if test="${item[1]=='N'}">未审核</c:if>
							<c:if test="${item[2]=='Y'}">已完工</c:if>
							<c:if test="${item[2]=='N'}">未完工</c:if>
						</td>
						<td>
							<a href="javascript:doShow('${item[0].id}');">查看</a>
						</td>
					</tr>
					</c:forEach>
				   </table>
				   <%@include file="../inc/Pages.jsp"%>
			  </div>
			</div>
</div>
</body>
</html>